import json

import   requests


url = 'http://127.0.0.1:8787/dar/user/login'
header ={"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"}
data={"user_name": "test01",
"passwd": "admin123" }

'''post  请求演示'''
res=requests.post(url=url,headers=header,data=data)

print(res)
print(res.text)
print(type(data))
data=json.dumps((data))
print(type(data))